home *** CD-ROM | disk | FTP | other *** search
Wrap
Subject: Compile Problems Sent: 5/24/96 12:12 PM Received: 5/24/96 12:21 PM From: Hutchings Software Development, hsd@earthlink.net Reply-To: ODF Interest, ODF-Interest@CILabs.ORG To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs. Hi, Here's what I'm trying to do. Basically, using FW_CEditText as a model (but not a superclass), I'm trying to write a general scrolling, styled text view in one class. It needs to be both a notifier and a receiver. I copied the following out of the CW Message Box. Error : illegal use of abstract class ('FW_MReceiver::HandleNotification(Environment*,constFW_CNotification&)') StyleEditView.cpp line 894 FW_CPrivWatcher(FW_PrivGetDeleteProc((const CStyleEditView*)0))) CStyleEditView(ev), FW_PrivWatcher_Pop() ) The code the compiler chokes on looks like: //------------------------------------------------------------------------ // CStyleEditView::Create //------------------------------------------------------------------------ void* CStyleEditView::Create( FW_CReadableStream& stream, FW_ClassTypeConstant type ) { FW_UNUSED(stream); FW_UNUSED(type); FW_SOMEnvironment ev; return FW_NEW(CStyleEditView, (ev)); // here's where it chokes } The start of my class definition looks like: class CStyleEditView : public FW_CView, public FW_MReceiver, public FW_MNotifier { public: FW_DECLARE_CLASS FW_DECLARE_AUTO(CStyleEditView) and I have the following macros at the top of my .cpp file: FW_DEFINE_CLASS_M3(CStyleEditView, FW_CView, FW_MReceiver, FW_MNotifier) FW_DEFINE_AUTO(CStyleEditView) const FW_ClassTypeConstant LStyleEditView = FW_TYPE_CONSTANT('S','t','E','V'); FW_REGISTER_ARCHIVABLE_CLASS( LStyleEditView, CStyleEditView, CStyleEditView::Create, FW_CView::Read, CStyleEditView::Destroy, FW_CView::Write ) Any ideas? I've found it a little difficult to parse through all the macros. I'm probably overlooking something very silly ;-). Thanks, Brad Richard B. "Brad" Hutchings General Partner, Hutchings Software Development hsd@earthlink.net <SMALLER><SMALLER><X-FONTSIZE><PARAM>9</PARAM><X-FONTNAME><PARAM>MPW</PARAM>Hi, Here's what I'm trying to do. Basically, using FW_CEditText as a model (but not a superclass), I'm trying to write a general scrolling, styled text view in one class. It needs to be both a notifier and a receiver. I copied the following out of the CW Message Box. </X-FONTNAME></X-FONTSIZE></SMALLER></SMALLER><X-COLOR><PARAM>RED=0;GREEN=9830;BLUE=61603</PARAM><SMALLER><SMALLER><X-FONTSIZE><PARAM>9</PARAM><X-FONTNAME><PARAM>MPW</PARAM>Error : illegal use of abstract class ('FW_MReceiver::HandleNotification(Environment*,constFW_CNotification&)') StyleEditView.cpp line 894 FW_CPrivWatcher(FW_PrivGetDeleteProc((const CStyleEditView*)0))) CStyleEditView(ev), FW_PrivWatcher_Pop() ) </X-FONTNAME></X-FONTSIZE></SMALLER></SMALLER></X-COLOR><SMALLER><SMALLER><X-FONTSIZE><PARAM>9</PARAM><X-FONTNAME><PARAM>MPW</PARAM> The code the compiler chokes on looks like: </X-FONTNAME></X-FONTSIZE></SMALLER></SMALLER><X-COLOR><PARAM>RED=0;GREEN=9830;BLUE=61603</PARAM><SMALLER><SMALLER><X-FONTSIZE><PARAM>9</PARAM><X-FONTNAME><PARAM>MPW</PARAM>//------------------------------------------------------------------------ // CStyleEditView::Create //------------------------------------------------------------------------ void* CStyleEditView::Create( FW_CReadableStream& stream, FW_ClassTypeConstant type ) { FW_UNUSED(stream); FW_UNUSED(type); FW_SOMEnvironment ev; return FW_NEW(CStyleEditView, (ev)); // here's where it chokes } </X-FONTNAME></X-FONTSIZE></SMALLER></SMALLER></X-COLOR><SMALLER><SMALLER><X-FONTSIZE><PARAM>9</PARAM><X-FONTNAME><PARAM>MPW</PARAM> The start of my class definition looks like: </X-FONTNAME></X-FONTSIZE></SMALLER></SMALLER><X-COLOR><PARAM>RED=0;GREEN=9830;BLUE=61603</PARAM><SMALLER><SMALLER><X-FONTSIZE><PARAM>9</PARAM><X-FONTNAME><PARAM>MPW</PARAM>class CStyleEditView : public FW_CView, public FW_MReceiver, public FW_MNotifier { public: FW_DECLARE_CLASS FW_DECLARE_AUTO(CStyleEditView) </X-FONTNAME></X-FONTSIZE></SMALLER></SMALLER></X-COLOR><SMALLER><SMALLER><X-FONTSIZE><PARAM>9</PARAM><X-FONTNAME><PARAM>MPW</PARAM> and I have the following macros at the top of my .cpp file: </X-FONTNAME></X-FONTSIZE></SMALLER></SMALLER><X-COLOR><PARAM>RED=0;GREEN=9830;BLUE=61603</PARAM><SMALLER><SMALLER><X-FONTSIZE><PARAM>9</PARAM><X-FONTNAME><PARAM>MPW</PARAM>FW_DEFINE_CLASS_M3(CStyleEditView, FW_CView, FW_MReceiver, FW_MNotifier) FW_DEFINE_AUTO(CStyleEditView) const FW_ClassTypeConstant LStyleEditView = FW_TYPE_CONSTANT('S','t','E','V'); FW_REGISTER_ARCHIVABLE_CLASS( LStyleEditView, CStyleEditView, CStyleEditView::Create, FW_CView::Read, CStyleEditView::Destroy, FW_CView::Write ) </X-FONTNAME></X-FONTSIZE></SMALLER></SMALLER></X-COLOR><SMALLER><SMALLER><X-FONTSIZE><PARAM>9</PARAM><X-FONTNAME><PARAM>MPW</PARAM> Any ideas? I've found it a little difficult to parse through all the macros. I'm probably overlooking something very silly ;-). Thanks, Brad Richard B. "Brad" Hutchings General Partner, Hutchings Software Development hsd@earthlink.net</X-FONTNAME></X-FONTSIZE></SMALLER></SMALLER>